﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;

namespace MvcFinalTest.Models
{
    public class EmployeeModel
    {
        public int EmployeeId { get; set; }

        [DisplayName("First Name")]
        [Required(ErrorMessage = "First Name is required.")]
        [RegularExpression("^[A-Za-z _]*$", ErrorMessage = "First Name is alphabet character (A-Z) and space")]
        public string FirstName { get; set; }

        [DisplayName("Last Name")]
        [Required(ErrorMessage = "Last Name is required.")]
        [RegularExpression("^[A-Za-z _]*$", ErrorMessage = "Last Name is alphabet character (A-Z) and space")]
        public string LastName { get; set; }

        [DisplayName("Email")]
        [Required(ErrorMessage = "Email is required.")]
        [RegularExpression("^[\\w-\\.]+@([\\w-]+\\.)+[\\w-]{2,4}$",ErrorMessage = "Email Must Contain a Valid Email Format")]
        public string Email { get; set; }

        [DisplayName("Address")]
        [Required(ErrorMessage = "Address is required.")]
        public string Address { get; set; }

        [DisplayName("Branch")]
        [Required(ErrorMessage = "Branch is required.")]
        public int BranchId { get; set; }

        [DisplayName("Job Type")]
        [Required(ErrorMessage = "Job Type is required.")]
        public int JobTypeId { get; set; }

        public string Branch { get; set; }     
        public string JobType { get; set; }
    }
}